<li><a href="#" selected="selected">Select a Town</a></li><li><a href="#" title="Bagenalstown" onclick="var varadd = jQuery(this).attr('title') ;console.log('varadd' , varadd) ;mksearchtwon('Bagenalstown');" title = "Bagenalstown">Bagenalstown</a></li>